]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
appDisplay: Don't clear signal handler id before emitting
authorJonas Ådahl <jadahl@gmail.com>
Thu, 2 Apr 2020 17:47:52 +0000 (19:47 +0200)
committerFlorian Müllner <florian.muellner@gmail.com>
Thu, 2 Apr 2020 20:53:20 +0000 (20:53 +0000)
Otherwise we won't clear the 'view-loaded' handler after it was emitted.

Also move field initialization to the correct place, i.e. the init
function of the base class.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1169

js/ui/appDisplay.js

index e07769caa71f806c33a2cab82b694f5a55c5b39a..654afc56b6dd27170624ef6b4daabb60c48ab594 100644 (file)
@@ -157,6 +157,10 @@ var BaseAppView = GObject.registerClass({
 
         this._items = new Map();
         this._orderedItems = [];
+
+        this._animateLaterId = 0;
+        this._viewLoadedHandlerId = 0;
+        this._viewIsReady = false;
     }
 
     _childFocused(_actor) {
@@ -192,8 +196,6 @@ var BaseAppView = GObject.registerClass({
             this._items.set(icon.id, icon);
         });
 
-        this._animateLaterId = 0;
-        this._viewLoadedHandlerId = 0;
         this._viewIsReady = true;
         this.emit('view-loaded');
     }
@@ -412,8 +414,6 @@ var AllView = GObject.registerClass({
         this._lastOvershootY = -1;
         this._lastOvershootTimeoutId = 0;
 
-        this._viewIsReady = false;
-
         Main.overview.connect('hidden', () => this.goToPage(0));
 
         this._redisplayWorkId = Main.initializeDeferredWork(this, this._redisplay.bind(this));